﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using METU_CMT.Business;

namespace METU_CMT
{
    public partial class ShowAnnouncementsScreen : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                BindAnnouncements();
            }
        }

        protected void BindAnnouncements()
        {
            Course _currentCourse = EntityFactory.GetCurrentCourse(UserType.Student);
            dtgAnnouncements.DataSource = _currentCourse.Announcements;
            dtgAnnouncements.DataBind();
        }
    }
}